home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4188 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.1 KB  |  43 lines

  1. Path: coranto.ucs.mun.ca!mlangdon
  2. From: mlangdon@morgan.ucs.mun.ca (Michael Langdon)
  3. Newsgroups: comp.lang.c++
  4. Subject: illegal initilization
  5. Date: 28 Jan 1996 19:26:50 GMT
  6. Organization: Memorial University of Newfoundland
  7. Message-ID: <4egilq$ekc@coranto.ucs.mun.ca>
  8. NNTP-Posting-Host: plato.ucs.mun.ca
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I trying to write  code that changes vga mode then paints the screen .     
  12. The code I am following is written for TC++ 3.0 but I am using TC++ 1.0  
  13. All the code works but one line. Can anybody tell what the line should be 
  14. in TC++ 1.0 (I am planning on getting a newer version VERY soon)
  15. The error comes up as illegal initilization for the line unsigned char 
  16. *vga ...  
  17.  
  18. #include <dos.h>
  19. #include <mem.h>
  20. #include <string.h>
  21.  
  22.  
  23. unsigned char *vga = (unsigned char *) MK_FP(0xA000, 0);
  24.  
  25. main()
  26. {
  27. _AX = 0x003;
  28. geninterrupt(0x10);
  29. memset(vga,200,0xffff);
  30. .
  31. .
  32. .
  33.  
  34.  
  35. --
  36.  
  37.     /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  38.      /\                   Mike Langdon                       /\
  39.      /\             mlangdon@plato.ucs.mun.ca                /\
  40.      /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  41.  
  42.  
  43.